package com.hertz.alarm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.hertz.alarm.dao.AbstractEntity;

// Generated 2013-12-26 9:51:59 by Hibernate Tools 3.4.0.CR1

/**
 * IrisNbaAlarm generated by hbm2java
 */
@Entity
@Table(name="iris_nba_alarm",catalog="app_myiris")
@NamedQueries({
	@NamedQuery(name = IrisNbaAlarm.GET_BY_UID_MID,query = "from IrisNbaAlarm where uid=? and mid=? "),
	@NamedQuery(name = IrisNbaAlarm.GET_BY_UID_MTIME,query = "from IrisNbaAlarm where uid=? and matchTime=? "),
	@NamedQuery(name = IrisNbaAlarm.GET_ALL_FROM_MTIME,query = "from IrisNbaAlarm where matchTime >= ?")
})
public class IrisNbaAlarm implements AbstractEntity<Long>,Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 109770776859386502L;
	public static final String GET_BY_UID_MID = "GET_BY_UID_MID";
	public static final String GET_BY_UID_MTIME = "GET_BY_UID_MTIME";
	public static final String GET_ALL_FROM_MTIME = "GET_BY_MTIME";
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	private long uid;
	private long mid;
	@Column(name="score_diff")
	private byte scoreDiff;
	private byte period;
	private byte remain;
	@Column(name="ring_name")
	private String ringName;
	@Column(name="ring_uri")
	private String ringUri;
	private boolean wave;
	private byte volume;
	private boolean again;
	private boolean increase;
	private byte status;
	@Column(name="notice_period")
	private byte noticePeriod;
	@Column(name="match_time")
	private long matchTime;
	private long ctime;
	private long utime;
	@Column(name="every_quarter")
	private boolean everyQuarter;
	public IrisNbaAlarm() {
	}

	public IrisNbaAlarm(long uid, long mid, byte scoreDiff, byte period,
			byte remain, String ringName,String ringUri, boolean wave, byte volume, boolean again,
			boolean increase, byte status, byte noticePeriod,long ctime, long utime,long matchTime,boolean everyQuarter) {
		this.uid = uid;
		this.mid = mid;
		this.scoreDiff = scoreDiff;
		this.period = period;
		this.remain = remain;
		this.ringName = ringName;
		this.ringUri = ringUri;
		this.wave = wave;
		this.volume = volume;
		this.again = again;
		this.increase = increase;
		this.status = status;
		this.noticePeriod = noticePeriod;
		this.ctime = ctime;
		this.utime = utime;
		this.matchTime = matchTime;
		this.everyQuarter = everyQuarter;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public long getUid() {
		return this.uid;
	}

	public void setUid(long uid) {
		this.uid = uid;
	}

	public long getMid() {
		return this.mid;
	}

	public void setMid(long mid) {
		this.mid = mid;
	}

	public byte getScoreDiff() {
		return this.scoreDiff;
	}

	public void setScoreDiff(byte scoreDiff) {
		this.scoreDiff = scoreDiff;
	}

	public byte getPeriod() {
		return this.period;
	}

	public void setPeriod(byte period) {
		this.period = period;
	}

	public byte getRemain() {
		return this.remain;
	}

	public void setRemain(byte remain) {
		this.remain = remain;
	}

	public String getRingName() {
		return this.ringName;
	}

	public void setRingName(String ringName) {
		this.ringName = ringName;
	}

	public String getRingUri() {
		return ringUri;
	}

	public void setRingUri(String ringUri) {
		this.ringUri = ringUri;
	}

	public boolean getWave() {
		return this.wave;
	}

	public void setWave(boolean wave) {
		this.wave = wave;
	}

	public byte getVolume() {
		return this.volume;
	}

	public void setVolume(byte volume) {
		this.volume = volume;
	}

	public boolean getAgain() {
		return this.again;
	}

	public void setAgain(boolean again) {
		this.again = again;
	}

	public boolean getIncrease() {
		return this.increase;
	}

	public void setIncrease(boolean increase) {
		this.increase = increase;
	}

	public byte getStatus() {
		return this.status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}

	public byte getNoticePeriod() {
		return noticePeriod;
	}

	public void setNoticePeriod(byte noticePeriod) {
		this.noticePeriod = noticePeriod;
	}

	public long getCtime() {
		return this.ctime;
	}

	public void setCtime(long ctime) {
		this.ctime = ctime;
	}

	public long getUtime() {
		return this.utime;
	}

	public void setUtime(long utime) {
		this.utime = utime;
	}
	public long getMatchTime() {
		return matchTime;
	}

	public void setMatchTime(long matchTime) {
		this.matchTime = matchTime;
	}

	public boolean getEveryQuarter() {
		return everyQuarter;
	}

	public void setEveryQuarter(boolean everyQuarter) {
		this.everyQuarter = everyQuarter;
	}

	@Override
	public String toString(){
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
}
